<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>
	<script type="text/javascript">
		// substring(开始下标，结束下标) 左闭右开
		let str = "随便吃"
		console.log(str.substring(1,3))

		// substr("开始下标"，街区的长度)
		console.log(str.substr(0,3))//孙悟空

		// slice()(开始下标，结束下标) 左闭右开
		console.log(str.slice(1,3))
	</script>
</body>
</html>